@extends('admin.layout.common')
@section('content')
    <link rel="stylesheet" href="{{url('/css/finance/sp-financial-statement.css')}}">
    <div class="content">
        <p class="tongzhi"><i class="iconfont icon laba">&#xe914;</i>{{getArticleByDepartmentId()}}</p>
        <h1 class="h1" style="margin:0;">财务记账中心</h1>
        <!-- 公共结束 -->
        <div class="big_box">
            <div class="statement">
                <h1 class="h1" style="width:100%;text-align: center;margin:0;border:none;">SP用户收入报表管理</h1>
                <ul class="cl" style="width:95%;margin:0 auto;">
                    @foreach($list as $v)
                        <a href="{{url('/admin/spInput').'/'.$v['year'].'/'.$v['month']}}">
                            <li class="@if(!$v['status']) action @endif">{{$v['year']}}年{{$v['month']}}月</li>
                        </a>
                    @endforeach
                </ul>
                <button type="button" value="新建月度报表" class="add_statement">新建月度报表</button>
            </div>
            <div class="broadside">
                <p>
                    <span class="span"></span>
                    <span>填写完整</span>
                </p>
                <p>
                    <span class="span blue_span"></span>
                    <span>未填写完整</span>
                </p>
            </div>
        </div>

    </div>
    <script>
      // 新建月度报表
      $('.add_statement').on('click', function () {
        layer.open({
          type: 2,
          skin: 'layui-layer-rim',
          area: ['720px', '350px'],
          content: '{{url('/admin/addStatistics')}}',
          end: function () {
            location.reload();
          }
        })
      });
    </script>
@endsection